# coding:utf-8
import DBCenter


def update_task():
    "更新任务"
    with open('.\lx_url_site(2).txt', 'r', encoding='utf8')as f:
        the_read = f.read().replace('"', '')  # .replace(' inurl:wcycn','')

    the_list_of_read = the_read.split('\n')

    the_list_of_read.remove('')
    # print(the_list_of_read)

    # 将读取道德任务放置在MongoDB（Redis）中

    return the_list_of_read


def get_a_task():
    """在这里领取任务"""
    pass


def get_all_task():
    "获取所有的任务"
    with open('lx_url_site(2).txt', 'r', encoding='utf=8')as f:
        the_read = f.read().replace('"', '')  # .replace(' inurl:wcycn','')
    the_list_of_read = the_read.split('\n')

    the_list_of_read.remove('')
    # print(the_list_of_read)
    return the_list_of_read


def record_task_completion():
    "记录任务完成情况"
    pass


def failed_task():
    "失败的任务"
    pass
